package com.lizhen.core.compare;

import java.util.Date;

public class EqualAndEquals {
    public static void main(String[] args) {
        Boolean b1 = 1 == 1;
        Boolean b12 = "123" == "123";
        Boolean b2 = "123" == new String("123");

        System.out.printf("%s %s %s%n", b1, b12, b2);

        Boolean b3 = new Integer(123).equals(new Integer(123));
        Boolean b32 = new String("123").equals(new String("123"));
        Boolean b33 = new Date().equals(new Date());

        System.out.printf("%s %s %s%n", b3, b32, b33);
    }
}
